<template>
  <div id="app">
    <!--  轮播图-->
    <!-- <van-swipe :autoplay="3000">
      <van-swipe-item v-for="(image, index) in images" :key="index">
        <img v-lazy="image" />
      </van-swipe-item>
    </van-swipe>-->
    <!--标签栏 路由模式 -->
    <router-view></router-view>
    <van-tabbar route active-color="#d81e06" inactive-color="#949494">
      <van-tabbar-item replace to="/home" class='iconfont icon-qiepian'>首页</van-tabbar-item>
      <van-tabbar-item replace to="/goods" class="iconfont icon-fenlei">分类</van-tabbar-item>
      <van-tabbar-item replace to="/search" class="iconfont icon-sousuo">搜索</van-tabbar-item>
      <van-tabbar-item replace to="/mycard" :info="changeNum" class="iconfont icon-ziyuan">购物车</van-tabbar-item>
      <van-tabbar-item replace to="/user" class="iconfont icon-yonghu">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
import {mapGetters} from 'vuex'
export default {
  data() {
    return {
       images: [
        'https://img.yzcdn.cn/vant/apple-1.jpg',
        '../src/assets/logo.png'
      ]
    }
  },
  methods: {},
  computed: {
    ...mapGetters(['changeNum'])
  },
}
</script>
<style lang='css' scoped>
img {
  width: 100%;
  height: 200px;
}
.van-tabbar-item {
  font-size: 12px
}
</style>
